<extend name="Base/common"/>

<block name="header">
    <link type="text/css" rel="stylesheet" href="__CSS__/news.css"/>
</block>

<block name="body">
<div class="content-body">
    <div class="col-md-12">
		<h2 class="content-title black">
	    	{$info.title}
	    </h2>
	</div>
	<div class="clearfix visible-md-block"></div>
	<div class="col-md-12 margin-bottom-10">
		<div class="meta" style="padding-bottom:10px;border-bottom: 1px solid #eaeaea;">
			<a style="padding-left:8px;" class="flag flag{$cate.order}" href="{:U('News/Index/index',array('category'=>$info['category']))}" title="{$cate.title}">{$cate.title}</a>
			用户： <a href="{$author.space_url}" ucard="{$author.uid}">{$author.nickname}</a>
			来自树丛：<a href="" class="c_yellow">爱情你我他</a>
			发布时间：{$info.create_time|friendlyDate}&nbsp;
			<if condition="check_auth('News/Index/edit',-1)||(($info['uid'] eq is_login())&&($info['status'] neq 1))">
				<a title="编辑" href="{:U('News/index/edit',array('id'=>$info['id']))}" class="gray"><i class="iconfont bj">&#xe641;</i>&nbsp;编辑</a>
			</if>
			<if condition="($info['status'] eq 1)&&($info['dead_line'] gt time())">
            {:W('Weibo/Share/shareBtn',array('param'=>array('title'=>$info['title'],'content'=>$info['description'],'img'=>getThumbImageById($info['cover'],160,160),'from'=>$MODULE_ALIAS,'site_link'=>U('news/index/detail',array('id'=>$info['id']))),'text'=>'分享','css' =>array('style'=>'font-size:16px;','class'=>'gray')))}
            </if>
			<dl>
				<dd>{:Hook('support',array('app'=>'News',table=>'detail','row'=>$info['id'],'uid'=>$info['uid'],'jump'=>'News/index/detail'))}</dd>
				<dd><i class="iconfont ">&#xe631;</i> {$info.comment}</dd>
				<dd><i class="iconfont fs24" style="vertical-align: -4px;">&#xe63a;</i> {$info.view}</dd>
			</dl>
		</div>
	</div>
	<div class="clearfix visible-md-block"></div>
	<div class="col-md-12 margin-top-15">
		<div class="signature word-wrap">
			{$info.detail.content|render}
		</div>
	</div>
	<div class="clearfix visible-md-block"></div>
	<div class="col-md-12">	
		<div class="pull-left">
			<div class="pull-left"><img src="__THEME_PUBLIC__/images/treeb.png" /></div>
			<div class="bdsharebuttonbox share pull-left" style="background:#f5f5f5">
				<a href="#" class="qzone" data-cmd="qzone" title="分享到QQ空间"></a>
				<a href="#" class="tqq" data-cmd="tqq" title="分享到腾讯微博"></a>
				<a href="#" class="weixin" data-cmd="weixin" title="分享到微信"></a>
				<a href="#" class="tsina" data-cmd="tsina" title="分享到新浪微博"></a>
			</div>
			
			<script>
				window._bd_share_config = {
					"common": {
						"bdSnsKey": {},
						"bdText": "",
						"bdMini": "2",
						"bdMiniList": false,
						"bdPic": "",
						"bdStyle": "1",
						"bdSize": "24"
					},
					"share": {}
				};
				with(document) 0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=' + ~(-new Date() / 36e5)];
			</script>
			<style>
				#bdshare_weixin_qrcode_dialog {
					min-height: 326px;
				}
			</style>
		</div>
		<div class="pull-right othernews">
			<?php
			    if($frontnews['id']!=null){
				    $id  = $frontnews['id'];
				    echo "<a class='pull-left c_yellow' href=".U('detail',array('id'=>$id)).">上一条:$frontnews[title]</a>";
			    }else{
			    	echo "<a class='pull-left gray' href='javascript:;'>上一条：没有了</a>";
			    }
			    if($afternews['id']!=null){
			    	echo "<a class='pull-right c_yellow' href=".U('detail',array('id'=>$afternews['id'])).">下一条:$afternews[title]</a>";
			    }else{
			    	echo "<a class='pull-right gray' href='javascript:;'>下一条：没有了</a>";
			    } 
		    ?>
		</div>
	</div>
	<div class="clearfix visible-md-block"></div>
    <div class="col-md-12">
    {:hook('localComment', array('path'=>"News/index/$info[id]", 'uid'=>$info['uid'],'count_model'=>'news','count_field'=>'comment','this_url'=>'news/index/detail'))}
    </div>
</div>
    
    <script type="text/javascript" charset="utf-8" src="__STATIC__/ueditor/third-party/SyntaxHighlighter/shCore.js"></script>
    <link rel="stylesheet" type="text/css" href="__STATIC__/ueditor/third-party/SyntaxHighlighter/shCoreDefault.css"/>
    <script type="text/javascript">
        SyntaxHighlighter.all();
    </script>
    <script>
        $(document).ready(function () {
            $('.popup-gallery').each(function () { // the containers for all your galleries
                $(this).magnificPopup({
                    delegate: '.popup',
                    type: 'image',
                    tLoading: 'Loading image #%curr%...',
                    mainClass: 'mfp-img-mobile',
                    gallery: {
                        enabled: true,
                        navigateByImgClick: true,
                        preload: [0, 1] // Will preload 0 - before current, and 1 after the current image
                    },
                    image: {
                        tError: '<a href="%url%">The image #%curr%</a> could not be loaded.',
                        titleSrc: function (item) {
                            /*           return item.el.attr('title') + '<small>by Marsel Van Oosten</small>';*/
                            return '';
                        }
                    }
                });
            });
        });
    </script>
</block>